<template>
  <div class="err">
    <img src="../assets/imgs/404.gif" alt="" />
  </div>
</template>

<script>
export default {
  created () {
    this.num = 3
    this.timer = setInterval(() => {
      if (this.num === 0) {
        this.$router.replace({ path: '/' })
        clearInterval(this.timer)
      }
    }, 1000)
  },
  destroyed () {
    clearInterval(this.timer)
  }
}
</script>

<style lang="less" scoped>
.err {
  width: 100%;
  height: 100%;
  overflow: hidden;
  img {
    height: 100%;
    width: 100%;
  }
}
</style>
